package com.acoffee.service.Impl;

import com.acoffee.mapper.CategoryMapper;
import com.acoffee.pojo.Category;
import com.acoffee.service.CategoryService;
import com.acoffee.utils.MyBatisUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

/**
 * @author acoffee
 * @create 2021-10-29 16:06
 */
public class CategoryServiceImpl implements CategoryService {

    SqlSession sqlSession = MyBatisUtil.getSqlSession();
    CategoryMapper categoryMapper = sqlSession.getMapper(CategoryMapper.class);

    @Override
    public List<Category> QueryAllCategory() {

        List<Category> categories = categoryMapper.QueryAllCategory();

        return categories;
    }
}
